package org.yuanqiframework.yuanqi.boot.sys.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * 系统字典父表
 *
 * @TableName sys_dict
 */
@Data
public class SysDictDTO implements Serializable {
    /**
     * 字典名称
     */
    @NotBlank(message = "[字典名称]不能为空")
    @Size(max = 20, message = "编码长度不能超过20")
    @Length(max = 20, message = "编码长度不能超过20")
    private String name;
    /**
     * 字典编码
     */
    @NotBlank(message = "[字典编码]不能为空")
    @Size(max = 50, message = "编码长度不能超过50")
    @Length(max = 50, message = "编码长度不能超过50")
    private String code;
    /**
     * 字典类型：list tree
     */
    @NotBlank(message = "[字典类型：list tree]不能为空")
    @Size(max = 10, message = "编码长度不能超过10")
    @Length(max = 10, message = "编码长度不能超过10")
    private String type;
    /**
     * 字典状态
     */
    @NotBlank(message = "[字典状态]不能为空")
    @Size(max = 10, message = "编码长度不能超过10")
    @Length(max = 10, message = "编码长度不能超过10")
    private String status;

    private List<SysDictOptionDTO> children;
}
